package com.aohanyao.product.flavorsdemos;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.animation.AnimationUtils;
import android.widget.TextView;

import com.aohanyao.product.flavorsdemos.global.Constant;

public class MainActivity extends AppCompatActivity {

    private TextView tvApi;
    private TextView tvVariant;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        tvApi = (TextView) findViewById(R.id.tv_api);
        tvApi.setText(Constant.API_ADDRESS);


        tvVariant = (TextView) findViewById(R.id.tv_variant);
        tvVariant.setText(R.string.variant_name);

        findViewById(R.id.iv).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
//                CTextView cTextView = (CTextView) findViewById(R.id.ctext);
//                cTextView.setText("Hello world 九零三零你了三年，。迷了路，的，", AnimationUtils.loadAnimation(MainActivity.this, R.anim.anim_fly), 300);
                HorizontalWrapLineLayout cTextView = (HorizontalWrapLineLayout) findViewById(R.id.ctext);
                cTextView.setText("Hello world 九零三零你了三年，。迷了路，的，", AnimationUtils.loadAnimation(MainActivity.this, R.anim.anim_fly), 300);

            }
        });


    }
}
